The invention was designed as an improvement over a well known, commercially available system of the type in which hardware, such as an IBM Personal Computer, is operated under a disk operating system (DOS) and in which files are stored on fixed disks using tree structured directories and path names. Information is stored on a disk according to a predetermined pattern of cylinders and sectors, each sector containing a predetermined number of bytes. In order to access a desired sector, a head must first be moved to the cylinder containing the desired sector, the disk rotated past the head until the desired sector is reached and then the sector is read and the contents placed in a buffer. In looking at the total amount of time required to access data on a disk, the principal delay occurs during physical movement of a head. Where an application requires a large amount of physical I/O activity, it is desirable to reduce as much as possible the degree of head movement.
Files are stored on the disk in a cluster or clusters of sectors, each cluster having a predetermined number of sectors. Each cluster has a unique different starting address. The locations of files on a disk are kept track of by means of a file allocation table (FAT) which itself is stored on the disk. Each position of the FAT is associated with a different cluster and contains an entry indicating there are no other clusters associated with a file or pointing to the next cluster of the file. Small files are contained in a single cluster. Long files are contained in clusters that are chained together.
Files are located through the use of tree structured directories. Each disk contains a root directory, many sub-directories and a multiplicity of files. A given file may be at the end of a path passing through the root directory and several sub-directories. Each directory contains entries for additional directories and files. A specific file may be identified by specifying the drive, path and filename. For example, C:/DIR1/DIR2/FILE1 identifies a filename FILE1 that is listed in directory DIR2, which is a sub-directory of DIR1 and listed therein, DIR1 being a sub-directory of the root directory, and listed therein, of drive C.
When a file is opened, it is necessary to access the drive and search through all of the directories specified in the path to locate the directory containing the entry of the filename. In such latter directory, all of the entries and filenames are searched until the desired one is located. If a file has not been previously opened, there will be no entry and therefore entries will have to be made before the file can be used. If the file has been previously opened, then the entry in the directory in which the filename is listed, contains an entry that is an index into the FAT that corresponds to the cluster where the file begins. During such open procedure, physical I/O activity must occur to access the root directory, each sub-directory and to search through a long list of filenames. In some applications, the same files are opened many times during the course of running a given program and because each opening involves a large amount of physical I/O activity, a relatively large amount of time can be lost. The invention is designed to improve upon the prior art method of opening by providing a method that rapidly opens files and reducing the amount of physical I/O activity associated with the opening process.